package blog.service.impl;

import blog.common.Result;
import blog.entity.Login;
import blog.mapper.LoginMapper;
import blog.service.LoginService;

import blog.utils.IpUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jjpzh
 * @since 2023-02-25
 */
@Service
public class LoginServiceImpl extends ServiceImpl<LoginMapper, Login> implements LoginService {

    @Autowired
    private IpUtil ipUtil;
    @Override
    public Result findUserAddress(String ip) {
        return Result.success(ipUtil.getAddr(ip));
    }
}
